﻿using System;
#if !PHONE
using Microsoft.Popfly.GameCreator.GameEngine.Behaviors.JSRuntime;
#endif

namespace Microsoft.Popfly.GameCreator.Data
{
    public class EffectInfo
    {
        [GameXamlProperty]
        public Boolean Fade;
        [GameXamlProperty]
        public Boolean Scale;

#if !PHONE
        // convert from form: {fade:false,scale:false}
        public static implicit operator EffectInfo(Microsoft.JScript.Runtime.Types.JSObject obj)
        {
            EffectInfo effect = new EffectInfo();
            effect.Fade = obj.GetAsType<bool>("fade", false);
            effect.Scale = obj.GetAsType<bool>("scale", false);
            return effect;
        }
#endif

    }
}